Skip to content

Conversation

@jakebox
Copy link
Contributor

@jakebox jakebox commented Sep 15, 2025

Thanks for all the hard work on taskwarrior-tui!

I thought it would be nice if tw-tui supported taskwarrior's report._.dateformat option. This PR reads this configuration parameter and uses it when formatting the due task property.

The only slight complexity in implementation is converting from Taskwarrior's date formatting to chrono date format. I want to spend a little more time cleaning this up, but wanted to post this draft PR to see if this is an acceptable feature to add.

-jacob

@jakebox
Copy link
Contributor Author

jakebox commented Sep 17, 2025

@kdheepak Sorry, should have tagged you on this draft.

@kdheepak
Copy link
Owner

I think this is great! Thanks for implementing a draft, I'd be open to adding this feature. My first thought is I'm not sure if all taskwarrior dateformats can be converted to chrono. If we can get a fallback for when that happens that would be good enough I think.

@jakebox
Copy link
Contributor Author

jakebox commented Sep 17, 2025

Thank you! I'll work on polishing it up and mark it when it's ready. I have a few other improvements I could work on and thought this would be a good one to get familiar with the project. Big fan!

@jakebox jakebox force-pushed the jb/dateformat-support branch from e77ef8c to aa1f493 Compare September 25, 2025 16:35
@jakebox jakebox marked this pull request as ready for review September 25, 2025 16:38
@jakebox
Copy link
Contributor Author

jakebox commented Sep 25, 2025

Okay, this should be ready! All of the taskwarrior date formats (https://taskwarrior.org/docs/dates/) are mapped to chrono (https://docs.rs/chrono/latest/chrono/format/strftime/index.html) formats, and any other characters just get passed through raw. If no format is provided we fallback to the existing Y-M-D. @kdheepak

@jakebox
Copy link
Contributor Author

jakebox commented Sep 26, 2025

These errors are from a file I haven't touched. Want me to fix them in this PR or another one?

@kdheepak
Copy link
Owner

If you can fix this in this PR that would be awesome! But no worries, I can also look at them later.

@jakebox
Copy link
Contributor Author

jakebox commented Sep 27, 2025

Fixed! I was on cargo 1.86.0 and the CI is running 1.90.0, this warning is new so I missed it.

@jakebox jakebox marked this pull request as draft September 29, 2025 15:54
@jakebox
Copy link
Contributor Author

jakebox commented Sep 29, 2025

Just want to check over a few more things.

@jakebox
Copy link
Contributor Author

jakebox commented Oct 5, 2025

Okay, we're ready now! I had realized that I was picking up some extra spaces into the ID column, it took me a second to track down but I fixed that bug (11da7c8). @kdheepak

@jakebox jakebox marked this pull request as ready for review October 5, 2025 16:08
@jakebox
Copy link
Contributor Author

jakebox commented Oct 19, 2025

Hi @kdheepak can we merge? Thanks!

@kdheepak kdheepak merged commit 9a7664a into kdheepak:main Oct 20, 2025
15 checks passed
@jakebox
Copy link
Contributor Author

jakebox commented Oct 20, 2025

Awesome, thank you!! This was fun and I hope to make some more contributions soon enough. Also, calling out that your deployment seems to not be working so new versions are not build on GitHub.

@kdheepak
Copy link
Owner

jfyi, I haven't forgotten about this, my plan is to update ratatui to v0.30.0 when it comes out and then make a release for this.

@kdheepak
Copy link
Owner

Never mind, made a release (accidentally)!

@jakebox
Copy link
Contributor Author

jakebox commented Oct 27, 2025

Nice! Let me know if you need any support on anything. I'm enjoying taskwarrior-tui and have a little energy/time to help if needed.

@kdheepak
Copy link
Owner

Awesome! Thank you for the offer! :)

Reporting any bugs you find would be amazing by itself. I have had a lot less time to devote to this than I would like, but have been meaning to get back to it again. So any small PRs like this would be great too, but absolutely no pressure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants